<html>
    <head>
        <title>橡皮筋动画效果</title>
        <meta charset="utf-8"/>
        <style>
            @import url('https://fonts.googleapis.com/css2?family=Inria+Sans&display=swap');
            *{
                margin: 0;
                padding: 0;
                font-family: 'Inria Sans', sans-serif;
            }
            body{
                height: 100vh;
                display: flex;
                justify-content: center;
                align-items: center;
                text-align: center;
            }
            .text{
                font-size: 24px;
                text-transform: uppercase;
            }
            .btn{
                width: 200px;
                height: 60px;
                background: coral;
                border: none;
                color: #fff;
                font-size: 16px;
                margin: 30px;
                text-transform: uppercase;
                cursor: pointer;
            }
            .box{
                width: 240px;
                height: 200px;
                background: cadetblue;
                margin: 0 auto;
            }
            @keyframes rubberBand{
                0%{
                    transform: scale3d(1, 1, 1);
                }
                35%{
                    transform: scale3d(1.25, 0.75, 1);
                }
                45%{
                    transform: scale3d(0.75, 1, 1);
                }
                60%{
                    transform: scale3d(1.2, 0.8, 1);
                }
                75%{
                    transform: scale3d(1.05, 0.95, 1);
                }
                100%{
                    transform: scale3d(1, 1, 1);
                }
            }
            .btn:hover{
                animation: rubberBand 1s;
            }
            .box:hover{
                animation: rubberBand 1s;
            }
            .text:hover{
                animation: rubberBand 1s;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <h2 class="text">I love you 3 thousnad</h2>
            <button class="btn">hover me</button>
            <div class="box">
            </div>
        </div>
    </body>
</html>